Optimal. Leaf size=172 \[ -\frac {6 d^2 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^3}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {6 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.23, antiderivative size = 172, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 8, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {4431, 4408, 3296, 2638, 4183, 2531, 2282, 6589} \[ \frac {6 i d (c+d x) \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 \text {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 \text {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 2531
Rule 2638
Rule 3296
Rule 4183
Rule 4408
Rule 4431
Rule 6589
Rubi steps
\begin {align*} \int (c+d x)^2 \csc ^2(a+b x) \sin (3 a+3 b x) \, dx &=\int \left (3 (c+d x)^2 \cos (a+b x) \cot (a+b x)-(c+d x)^2 \sin (a+b x)\right ) \, dx\\ &=3 \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx-\int (c+d x)^2 \sin (a+b x) \, dx\\ &=\frac {(c+d x)^2 \cos (a+b x)}{b}+3 \int (c+d x)^2 \csc (a+b x) \, dx-3 \int (c+d x)^2 \sin (a+b x) \, dx-\frac {(2 d) \int (c+d x) \cos (a+b x) \, dx}{b}\\ &=-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}-\frac {2 d (c+d x) \sin (a+b x)}{b^2}-\frac {(6 d) \int (c+d x) \cos (a+b x) \, dx}{b}-\frac {(6 d) \int (c+d x) \log \left (1-e^{i (a+b x)}\right ) \, dx}{b}+\frac {(6 d) \int (c+d x) \log \left (1+e^{i (a+b x)}\right ) \, dx}{b}+\frac {\left (2 d^2\right ) \int \sin (a+b x) \, dx}{b^2}\\ &=-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {2 d^2 \cos (a+b x)}{b^3}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}+\frac {6 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}-\frac {\left (6 i d^2\right ) \int \text {Li}_2\left (-e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 i d^2\right ) \int \text {Li}_2\left (e^{i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (6 d^2\right ) \int \sin (a+b x) \, dx}{b^2}\\ &=-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}+\frac {6 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}-\frac {\left (6 d^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac {\left (6 d^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}\\ &=-\frac {6 (c+d x)^2 \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {8 d^2 \cos (a+b x)}{b^3}+\frac {4 (c+d x)^2 \cos (a+b x)}{b}+\frac {6 i d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )}{b^2}-\frac {6 i d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 \text {Li}_3\left (-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^3}-\frac {8 d (c+d x) \sin (a+b x)}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.10, size = 223, normalized size = 1.30 \[ \frac {4 \cos (b x) \left (\cos (a) \left (b^2 (c+d x)^2-2 d^2\right )-2 b d \sin (a) (c+d x)\right )-4 \sin (b x) \left (\sin (a) \left (b^2 (c+d x)^2-2 d^2\right )+2 b d \cos (a) (c+d x)\right )+3 b^2 (c+d x)^2 \log \left (1-e^{i (a+b x)}\right )-3 b^2 (c+d x)^2 \log \left (1+e^{i (a+b x)}\right )+6 i b d (c+d x) \text {Li}_2\left (-e^{i (a+b x)}\right )-6 i b d (c+d x) \text {Li}_2\left (e^{i (a+b x)}\right )-6 d^2 \text {Li}_3\left (-e^{i (a+b x)}\right )+6 d^2 \text {Li}_3\left (e^{i (a+b x)}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.54, size = 562, normalized size = 3.27 \[ \frac {6 \, d^{2} {\rm polylog}\left (3, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + 6 \, d^{2} {\rm polylog}\left (3, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 6 \, d^{2} {\rm polylog}\left (3, -\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 6 \, d^{2} {\rm polylog}\left (3, -\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + 8 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - 2 \, d^{2}\right )} \cos \left (b x + a\right ) + {\left (-6 i \, b d^{2} x - 6 i \, b c d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (6 i \, b d^{2} x + 6 i \, b c d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (-6 i \, b d^{2} x - 6 i \, b c d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (6 i \, b d^{2} x + 6 i \, b c d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + 2 \, a b c d - a^{2} d^{2}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) - 16 \, {\left (b d^{2} x + b c d\right )} \sin \left (b x + a\right )}{2 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )}^{2} \csc \left (b x + a\right )^{2} \sin \left (3 \, b x + 3 \, a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.20, size = 481, normalized size = 2.80 \[ \frac {2 \left (d^{2} x^{2} b^{2}+2 b^{2} c d x +2 i b \,d^{2} x +b^{2} c^{2}+2 i b c d -2 d^{2}\right ) {\mathrm e}^{i \left (b x +a \right )}}{b^{3}}+\frac {2 \left (d^{2} x^{2} b^{2}+2 b^{2} c d x -2 i b \,d^{2} x +b^{2} c^{2}-2 i b c d -2 d^{2}\right ) {\mathrm e}^{-i \left (b x +a \right )}}{b^{3}}+\frac {12 c d a \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 i c d \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {6 i c d \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 c^{2} \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {6 d^{2} a^{2} \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{2}}{b^{3}}+\frac {6 i d^{2} \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {3 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}-\frac {3 d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{3}}-\frac {6 i d^{2} \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {6 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {6 c d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}-\frac {6 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}-\frac {6 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}-\frac {6 d^{2} \polylog \left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 d^{2} \polylog \left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.49, size = 409, normalized size = 2.38 \[ \frac {c^{2} {\left (8 \, \cos \left (b x + a\right ) - 3 \, \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right ) + 3 \, \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \relax (a) + \cos \relax (a)^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \relax (a) + \sin \relax (a)^{2}\right )\right )}}{2 \, b} - \frac {12 \, d^{2} {\rm Li}_{3}(-e^{\left (i \, b x + i \, a\right )}) - 12 \, d^{2} {\rm Li}_{3}(e^{\left (i \, b x + i \, a\right )}) + {\left (6 i \, b^{2} d^{2} x^{2} + 12 i \, b^{2} c d x\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) + {\left (6 i \, b^{2} d^{2} x^{2} + 12 i \, b^{2} c d x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 8 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x - 2 \, d^{2}\right )} \cos \left (b x + a\right ) + {\left (-12 i \, b d^{2} x - 12 i \, b c d\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + {\left (12 i \, b d^{2} x + 12 i \, b c d\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - 3 \, {\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 16 \, {\left (b d^{2} x + b c d\right )} \sin \left (b x + a\right )}{2 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.01 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________